using System.Web.Mvc;
using System.Web.Routing;
using Rhino.Commons;

namespace Kym.Web
{
    public class KymControllerFactory : IControllerFactory
    {
        public IController CreateController(RequestContext context, string controllerName)
        {
            return IoC.Resolve<IController>(controllerName + "Controller");
        }

        public void DisposeController(IController controller)
        {
            IoC.Container.Release(controller);
        }
    }
}